package state.practice_03;

/**
 * @author yi qiang
 * @date 2021/6/15 17:29
 */
public class Context {
    private State state;

    public Context(State state){
        this.state=state;
    }

    public void handle(){
        state.handle();
        this.setState(state.changeState());
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }
}
